#ifndef _AM_TONE_PLAYER_H
#define _AM_TONE_PLAYER_H

#include "common/apps/player_app.h"


//#define TENCENT_ONLINE

/*
   THIS PLAYER IS USE FOR ONLINE AUDIO CONTINUE PLAY AFTER PAUSE
   IT IS BLOCK MODE
   some default music defult_media.bin 1930k
   wozai.mp3
   net_con_success.mp3
   net_no_con.mp3
   scan_qr_config_net.mp3
   softap.mp3
*/

typedef enum  default_music_list_t
{
   
    WAKEUP_M = 1,   //wozai.mp3
    NET_LINK_UP ,   //net_con_success.mp3
    NET_LINK_DOWN , //net_no_con.mp3
    START_CONFIG_NET,//scan_qr_config_net.mp3
    SOFTAP_CONFIGNET //softap.mp3

}default_music_list_t;


/*
   default music list , contain address and len
*/

typedef struct default_music_params_t
{
   int start_address;
   int music_len;

}default_music_params_t;

static default_music_params_t defaule_list[5] = {
   //wozai.mp3
   {
       .start_address = 0x1e7840,
       .music_len = 0x558
   },
   //net_con_success.mp3
   {
       .start_address = 0x1e7d98,
       .music_len = 0x2208

   },
   //net_no_con.mp3
   {
       .start_address = 0x1e9fa0,
       .music_len = 0xaf8
   },
   //scan_qr_config_net.mp3
   {
       .start_address = 0x1eaa98,
       .music_len = 0x16c8

   },
   //softap.mp3
   {
       .start_address =0x1ec160 ,
       .music_len = 0x1d40
   }
};

#ifdef TENCENT_ONLINE
int  am_tone_player_init(player_base *in_player);
#else
int  am_tone_player_init();
#endif

int  am_tone_player_defaultplay(default_music_list_t def_music);

int  am_tone_player_play(int start_address, int music_len);







#endif